/*    */ package com.qmsk.business.activity.activity.dao;
/*    */ 
/*    */ import com.qmsk.business.sys.basic.SupportDAO;
/*    */ import com.utils.basic.MapUtils;
/*    */ import com.utils.gson.in.GsonHeadOneRow;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import java.sql.SQLException;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class ActivityDAO extends SupportDAO
/*    */ {
/*    */   public GsonEbRst getGsonOfAll(Map<String, Object> params, Integer nPageIdx, Short nPageSize)
/*    */     throws SQLException
/*    */   {
/* 24 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, 
/* 25 */       nPageSize, true); }
/*    */ 
/*    */   public GsonEbRst getGsonOfAll(Map<String, Object> params) throws SQLException {
/* 28 */     return getGsonOfParams("selectSqlOfAll", params, false); }
/*    */ 
/*    */   public GsonEbRst getGsonOfId(Long id) throws SQLException {
/* 31 */     Map params = new HashMap();
/* 32 */     MapUtils.addToMap(params, "id", id);
/* 33 */     return getGsonOfParams("selectSqlOfAll", params, false);
/*    */   }
/*    */ 
/*    */   public int updateIndexUrl(Long shopId, String url) throws SQLException {
/* 37 */     String[] heads = { "indexURL", "id" };
/* 38 */     Object[] datas = { url, shopId };
/* 39 */     return updateJsonOneRow(new GsonHeadOneRow(heads, datas));
/*    */   }
/*    */ 
/*    */   public int updateStatus(Long id, Integer status) throws SQLException {
/* 43 */     String[] heads = { "status", "id" };
/* 44 */     Object[] datas = { status, id };
/* 45 */     return updateJsonOneRow(new GsonHeadOneRow(heads, datas));
/*    */   }
/*    */ 
/*    */   public int updateImgUrl(String fldName, String imgUrl, Long id) throws SQLException
/*    */   {
/* 50 */     String[] head = { fldName, "id" };
/* 51 */     Object[] data = { imgUrl, id };
/* 52 */     GsonHeadOneRow g = new GsonHeadOneRow(head, data);
/* 53 */     return updateJsonOneRow(g);
/*    */   }
/*    */ 
/*    */   public int updateCheckedOfIds(String userName, Long id, Integer status) throws SQLException
/*    */   {
/* 58 */     Object[] strParams = { userName, id };
/* 59 */     if (status.intValue() == 1) {
/* 60 */       return update("updateCheckedOfIds", strParams);
/*    */     }
/* 62 */     return update("updateCancelOfIds", strParams);
/*    */   }
/*    */ 
/*    */   public Long getShopId(Long id) throws SQLException
/*    */   {
/* 67 */     Map params = new HashMap();
/* 68 */     MapUtils.addToMap(params, "id", id);
/* 69 */     return queryForLong("selectShopId", params, Long.valueOf(0L));
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.activity.activity.dao.ActivityDAO
 * JD-Core Version:    0.5.3
 */